<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
    tr,
    th,
    td {
        border: 1px solid;
    }
</style>

<body>
    <div id="app">
        <span :style="[bGc,bFc]">车水马龙的人间少年</span>
    </div>
    <div id="app2">
        <table>
            <tr>
                <th>ID</th>
                <th>名字</th>
                <th>工作</th>
            </tr>
            <div v-if="list.length>0">
                <tr v-for="i in list">
                    <td>{{i.id}}</td>
                    <td>{{i.name}}</td>
                    <td>{{i.work}}</td>
                </tr>
            </div>
            <div v-else>
                没有数据！
                <!-- <tr>
                    <td>没有数据！</td>
                </tr> -->
            </div>
        </table>
    </div>
</body>
<script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
<script>
    let list = [
        {
            id: 1,
            name: '花花',
            work: '工程师'
        },
        {
            id: 2,
            name: '叶叶',
            work: '架构师'
        },
        {
            id: 3,
            name: '妥妥',
            work: '项目经理'
        }
    ]
    let app = new Vue({
        el: '#app',
        data: {
            bGc: {
                color: 'pink'
            },
            bFc: {
                'background-color': 'brown'
            }
        }
    })

    let app2 = new Vue({
        el: '#app2',
        data:
        {
            list
        }
    })
</script>

</html>